import { _decorator, Component, Node } from 'cc';
import { UIBase } from './ui_base';
const { ccclass, property } = _decorator;

@ccclass('UIPanelBase')
export class UIPanelBase extends UIBase {
    @property(Node)
    closeBtn: Node | null = null;

    onEnable () {
        this.closeBtn?.on(Node.EventType.TOUCH_END, this.onClose, this);
    }

    onDisable () {
        super.onDisable();
        this.closeBtn?.off(Node.EventType.TOUCH_END, this.onClose, this);
    }
}

